package day10;

import java.math.BigDecimal;

public class Demo05 {
    public static void main(String[] args) {
        //BigDecimal 检查误差
        BigDecimal b1 = new BigDecimal("0.1");//传递值的时候传递的是String 值
        BigDecimal b2 = new BigDecimal("0.2");
        BigDecimal b3 = b1.add(b2);
        System.out.println(b3);//0.3
    }
}
